From 12ef2d08b7aeec6765bb2c2104ddbbd5e70070c3 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 27 Oct 2016 11:56:11 +0100 Subject: [PATCH] Incorporated many changes from 4.8.0-0ubuntu2 - libxen-dev is M-A: same - Work around grep bug http://bugs.launchpad.net/bugs/1547466 - debian/xen-hypervisor-4.6.xen.cfg: Additional config file to simplify grub configuration. - Use new library/abiname scheme. - Document what xl and xm are in default.xen - Add libvirtd dependency to xendomains init script (Thanks to Stefan Bader and others.) Signed-off-by: Ian Jackson --- debian/changelog | 9 ++++ debian/control | 1 + debian/libxen-dev.install | 23 +++++++- debian/rules.real | 18 +++++-- .../usr/share/xen-utils-common/default.xen | 4 +- debian/xen-hypervisor-4.8.xen.cfg | 54 +++++++++++++++++++ debian/xen-utils-common.xendomains.init | 4 +- 7 files changed, 106 insertions(+), 7 deletions(-) create mode 100644 debian/xen-hypervisor-4.8.xen.cfg diff --git a/debian/changelog b/debian/changelog index d38949707c..90d2d1834e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,15 @@ xen (4.8.0~rc3-0~exp) UNRELEASED; urgency=medium * New upstream version, Xen 4.8.0 RC3. + * Incorporated many changes from 4.8.0-0ubuntu2 + - libxen-dev is M-A: same + - Work around grep bug http://bugs.launchpad.net/bugs/1547466 + - debian/xen-hypervisor-4.6.xen.cfg: + Additional config file to simplify grub configuration. + - Use new library/abiname scheme. + - Document what xl and xm are in default.xen + - Add libvirtd dependency to xendomains init script + (Thanks to Stefan Bader and others.) -- Ian Jackson Mon, 24 Oct 2016 17:31:27 +0100 diff --git a/debian/control b/debian/control index ab53afdde7..fddf165fa5 100644 --- a/debian/control +++ b/debian/control @@ -26,6 +26,7 @@ Multi-Arch: same Package: libxen-dev Architecture: amd64 arm64 armhf i386 Section: libdevel +Multi-Arch: same Depends: libxen-4.8 (= ${binary:Version}), libxenstore3.0 (= ${binary:Version}), ${misc:Depends} Description: Public headers and libs for Xen This package contains the public headers and static libraries for Xen. diff --git a/debian/libxen-dev.install b/debian/libxen-dev.install index 96ffc25398..df5b859e4d 100644 --- a/debian/libxen-dev.install +++ b/debian/libxen-dev.install @@ -8,6 +8,16 @@ usr/lib/*/libxenstore.a usr/lib/*/libxenstore.so usr/lib/*/libxlutil.a usr/lib/*/libxlutil.so +usr/lib/*/libxencall.a +usr/lib/*/libxencall.so +usr/lib/*/libxenevtchn.a +usr/lib/*/libxenevtchn.so +usr/lib/*/libxenforeignmemory.a +usr/lib/*/libxenforeignmemory.so +usr/lib/*/libxengnttab.a +usr/lib/*/libxengnttab.so +usr/lib/*/libxentoollog.a +usr/lib/*/libxentoollog.so usr/include/_libxl*.h usr/include/libxl*.h usr/include/xenctrl.h @@ -15,5 +25,16 @@ usr/include/xenguest.h usr/include/xenstore*.h usr/include/xenstore-compat/xs* usr/include usr/include/xentoollog.h -usr/include/xenctrlosdep.h usr/include/xen +usr/lib/*/pkgconfig/*.pc +# New headers in xen-4.8 +#usr/include/fsimage_grub.h +#usr/include/fsimage.h +#usr/include/fsimage_plugin.h +#usr/include/libxenvchan.h +usr/include/xencall.h +usr/include/xenctrl_compat.h +usr/include/xenevtchn.h +usr/include/xenforeignmemory.h +usr/include/xengnttab.h +usr/include/xenstat.h diff --git a/debian/rules.real b/debian/rules.real index 9fcfb7afc6..bda089232b 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -81,11 +81,16 @@ $(STAMPS_DIR)/build-docs: $(STAMPS_DIR)/setup-docs +$(MAKE_CLEAN) -C $(DIR)/docs touch $@ +# Adding LANG=C.UTF-8 to the build environment to work around a bug in grep +# which causes it to switch into binary mode in the middle of a file. +# (see http://bugs.launchpad.net/bugs/1547466) + $(STAMPS_DIR)/build-hypervisor_$(ARCH)_$(FLAVOUR): DIR=$(BUILD_DIR)/build-hypervisor_$(ARCH)_$(FLAVOUR) $(STAMPS_DIR)/build-hypervisor_$(ARCH)_$(FLAVOUR): $(STAMPS_DIR)/setup-hypervisor_$(ARCH)_$(FLAVOUR) +$(MAKE_CLEAN) -C $(DIR)/xen \ XEN_COMPILE_ARCH=$(XEN_ARCH) \ - XEN_TARGET_ARCH=$(XEN_ARCH) + XEN_TARGET_ARCH=$(XEN_ARCH) \ + LANG=C.UTF-8 touch $@ $(STAMPS_DIR)/build-utils_$(ARCH) \ @@ -97,7 +102,8 @@ $(STAMPS_DIR)/install-utils_$(ARCH): CONFIG = \ APPEND_CPPFLAGS="$(CPPFLAGS)" \ APPEND_LDFLAGS="$(LDFLAGS)" \ OCAMLDESTDIR=$(CURDIR)/$(BUILD_DIR)/install-utils_$(ARCH)/$(OCAML_STDLIB_DIR) \ - PYTHON=$(shell pyversions -r) + PYTHON=$(shell pyversions -r) \ + LANG=C.UTF-8 $(STAMPS_DIR)/build-utils_$(ARCH): DIR=$(BUILD_DIR)/build-utils_$(ARCH) $(STAMPS_DIR)/build-utils_$(ARCH): $(STAMPS_DIR)/setup-utils_$(ARCH) @@ -153,6 +159,10 @@ install-hypervisor_$(ARCH)_$(FLAVOUR): $(STAMPS_DIR)/build-hypervisor_$(ARCH)_$( dh_testroot dh_prep dh_installdirs boot + # FIXME: Think of better solution (grub used for other arches?) + dh_installdirs etc/default/grub.d + install -D -m644 debian/xen-hypervisor-$(VERSION).xen.cfg \ + debian/$(PACKAGE_NAME)/etc/default/grub.d/xen.cfg cp $(DIR)/xen/xen$(IMAGE_SUFFIX) debian/$(PACKAGE_NAME)/boot/xen-$(VERSION)-$(FLAVOUR)$(IMAGE_SUFFIX) ifeq ($(ARCH),amd64) cp $(DIR)/xen/xen.efi debian/$(PACKAGE_NAME)/boot/xen-$(VERSION)-$(FLAVOUR).efi @@ -165,7 +175,7 @@ install-libxen_$(ARCH): $(STAMPS_DIR)/install-utils_$(ARCH) install-libxenstore_ dh_testdir dh_testroot dh_prep - dh_install --sourcedir=$(DIR) usr/lib/*/lib*-$(VERSION).so + dh_install --sourcedir=$(DIR) usr/lib/*/lib*-$(VERSION).so* dh_strip dh_makeshlibs -V dh_shlibdeps @@ -178,6 +188,8 @@ install-libxen-dev_$(ARCH): $(STAMPS_DIR)/install-utils_$(ARCH) dh_testdir dh_testroot dh_prep + # Move pkgconfig into a multiarch compliant place + mv $(DIR)/usr/share/pkgconfig $(DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/ dh_install --sourcedir=$(DIR) dh_strip dh_shlibdeps diff --git a/debian/tree/xen-utils-common/usr/share/xen-utils-common/default.xen b/debian/tree/xen-utils-common/usr/share/xen-utils-common/default.xen index 65f5196cbd..87a35f3a11 100644 --- a/debian/tree/xen-utils-common/usr/share/xen-utils-common/default.xen +++ b/debian/tree/xen-utils-common/usr/share/xen-utils-common/default.xen @@ -2,6 +2,8 @@ # ---------------------------- # There exists several tool stacks to configure a Xen system. -# … +# xl: This is the new toolstack using libxenlight/libxl (default) +# xm: Was the old toolstack (xend) which is no longer supported! +# # Attention: You need to reboot after changing this! TOOLSTACK= diff --git a/debian/xen-hypervisor-4.8.xen.cfg b/debian/xen-hypervisor-4.8.xen.cfg new file mode 100644 index 0000000000..b2d2f6ee93 --- /dev/null +++ b/debian/xen-hypervisor-4.8.xen.cfg @@ -0,0 +1,54 @@ +# +# Uncomment the following variable and set to 0 or 1 to avoid warning. +# +#XEN_OVERRIDE_GRUB_DEFAULT=0 + +echo "Including Xen overrides from /etc/default/grub.d/xen.cfg" + +# +# When running update-grub with the Xen hypervisor installed, there are +# some additional variables that can be used to pass options to the +# hypervisor or the dom0 kernel. + +# The following two are used to generate arguments for the hypervisor: +# +#GRUB_CMDLINE_XEN_DEFAULT="" +#GRUB_CMDLINE_XEN="" +# +# For example: +# +# dom0_mem=[M]:max=[M] +# Sets the amount of memory dom0 uses (max prevents balloning for more) +# com[12]=, +# Initialize a serial console from in the hypervisor (eg. 115200,8n1) +# Note that com1 would be ttyS0 in Linux. +# console=[, ...] +# Redirects Xen hypervisor console (eg. com1,vga) + +# +# The next two lines are used for creating kernel arguments for the dom0 +# kernel. This allows to have different options for the same kernel used +# natively or as dom0 kernel. +# +#GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT" +#GRUB_CMDLINE_LINUX_XEN_REPLACE="$GRUB_CMDLINE_LINUX" +# +# For example: +# +# earlyprintk=xenboot +# Allows to send early printk messages to the Xen hypervisor console +# console=hvc0 +# Redirects the Linux console to the hypervisor console + +# +# Make booting into Xen the default if not changed above. Finding the +# current string for it always has been a problem. +# +if [ "$XEN_OVERRIDE_GRUB_DEFAULT" = "" ]; then + echo "WARNING: GRUB_DEFAULT changed to boot into Xen by default!" + echo " Edit /etc/default/grub.d/xen.cfg to avoid this warning." + XEN_OVERRIDE_GRUB_DEFAULT=1 +fi +if [ "$XEN_OVERRIDE_GRUB_DEFAULT" = "1" ]; then + GRUB_DEFAULT="Debian GNU/Linux, with Xen hypervisor" +fi diff --git a/debian/xen-utils-common.xendomains.init b/debian/xen-utils-common.xendomains.init index 5fd5a5d46e..e1164b21bb 100644 --- a/debian/xen-utils-common.xendomains.init +++ b/debian/xen-utils-common.xendomains.init @@ -5,8 +5,8 @@ # Required-Stop: $syslog $remote_fs xen # Should-Start: drbd iscsi openvswitch-switch # Should-Stop: drbd iscsi openvswitch-switch -# X-Start-Before: corosync heartbeat -# X-Stop-After: corosync heartbeat +# X-Start-Before: corosync heartbeat libvirtd +# X-Stop-After: corosync heartbeat libvirtd # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start/stop secondary xen domains -- 2.30.2